1. Field of the Invention
The present invention relates to an image processing device suitable for use in printers, specifically to an image processing device that compresses image data and decompresses again.
2. Description of the Related Art
A printer such as a laser printer receives a page description language (PDL) from a host computer by way of a network such as the Ethernet, and a printer controller inside the printer converts the PDL into an intermediate language that is easier to convert it into image data (decomposing processing), and then generates a print image from the intermediate language (rendering processing). At this case, a memory capacity more than 32 M bytes is usually needed in order to store print image data for one page of the A3 size in a color bitmap image, with the resolution 600 dpi.
Naturally, it has been considered to compress image data before storing and decompress before printing to output. In such a case, for example, one page is divided into plural regions (bands) by a specific number of lines (banding processing), and the image data is compressed by each band, which is a technique usually adopted.
The general banding processing with compression will be explained. First, in the decomposing processing, an inputted PDL is decoded, an intermediate language by each band is generated, and the intermediate language by each band for the whole one page is stored in the memory. Next, rendering is carried out by each band, and the print image data is stored in the memory. As the image data for one band is made, the data is compressed to be stored in the memory. This is carried out for all the bands in one page. After the compression for one page is completed, a decompressor decompresses the data in real time, and outputs the image data to a print engine to form the image. Thus, the image can be formed without decompressing the image data for one page in the memory.
However, in this method of compressing the image data for one page and thereafter decompressing it, the compression and the decompression each require certain time, which is a problem. When a manuscript of the A3 size with the resolution of 600 dpi is compressed and decompressed in real time at the rate of about 20 M bits/sec, it takes about three seconds if the manuscript is a black-and-white image, and it takes about 12 seconds if that is a color image. In case of receiving the PDL and forming the image, the time for decomposing and rendering is also needed in addition to the above time; and accordingly, a large amount of time will be spent before starting the printing, which is a problem.
Also, a method has been proposed which improves the rendering performance and outputs images in real time to a print engine by an intermediate language without the compression and the decompression processing. However, the time required for the rendering processing varies, depending on the image data. In the printer disclosed in Japanese Published Unexamined Patent Application No. Hei 8-224917, for example, a system has been proposed which, after decompressing image data, compresses the image data and decompresses it when printing, if the time required for the rendering by each band is predicted and the predicted time does not reach a time required for the print engine processing the data at its processing speed. However in such a system, an intermediate language and coded data are mixed, and the image data is required to be generated while switching the intermediate language and the coded data when the data is outputted to the print engine; and accordingly, the processing becomes complicated, which is a problem.
On the other hand, as a high efficiency compression technique of binary images, JBIG is known as the international standard. In the JBIG, the arithmetic coding method is applied to the entropy coding unit. The arithmetic coding method has been proposed by Elias as an idealistic coding method for an information source not having a memory, and reorganized by Langdon and Rissanen into a practicable form.
FIG. 9 is a chart illustrating the arithmetic coding method. First, the area (0, 1) on the number line is divided into P0 and P1 to make the areas A0 and A1 (these areas are called the augend). Next, if the first symbol X1 from the information source is “0”, the area A0 is selected; and if it is “1”, the area A1 is selected. In the example shown in FIG. 9, X1=0, and the area A0 is selected. The selected areas are hatched on the drawing.
Next, the area A0 is divided by an eventual probability of the second symbol X2 into the areas A00 and A01. Here, if X2=“0”, the area A00 is selected; and if X2=“1”, the area A01 is selected. In the example in FIG. 9, X2=“1”,the area A01 is selected.
Thus, the division of the areas and the selection of the divided areas are carried out for the number of an output series of the information source, and the output series is expressed by the binary-coded decimal notation of one point inside the area obtained by the division at the final stage. Assuming that the nth symbol is given by Xn, the augend when the (n−1)th symbol is coded is A(n−1), and the eventual probability of the inferior symbol (LPS) “1” is P(1), the nth augend A(n) is expressed as follows:when Xn=1, A(n)=A(n−1)×P(1)when Xn=0, A(n)=A(n−1)−{A(n−1)×P(1)}                here, LPS=1And, provided that the code series when the (n−1)th symbol is coded is given by C(n−1), the nth code series C(n) is expressed as follows:when Xn=1, C(n)=C(n−1)+{A(n−1)×P(1)}when Xn=0, C(n)=C(n−1)        here, LPS=1        
In the JBIG, operations involving the multiplication as above are not carried out, and a subtraction-type arithmetic code whereby probability arithmetic operations are carried out only by subtraction is adopted by preparing the values of the augend as a table for each group in correspondence with probability predict values. This coder adopted by the JBIG is called the QM-Coder. This adoption deteriorates the coding efficiency, but makes the hardware configuration simple. The augend and code operations by the QM-Coder are shown bellow.when Xn=1, A(n)=table value QnC(n)=C(n−1)+table value Qnwhen Xn=0, A(n)=A(n−1)−table value QnC(n)=C(n−1)                here, LPS=1        
In the JBIG, the symbol series is generated on the basis of an prediction result obtained by an attention pixel and surrounding pixel values. This prediction value is generated while updating the prediction result at any time by a learning prediction table that feeds back the prediction result. The JBIG specifies that the prediction table value is all zero at the initial state. That is, if the attention pixel value is all zero, the prediction value of this prediction table remains zero, and the prediction all hits. Therefore, the foregoing symbol series Xn becomes all zero. Since C(n)=C(n−1) and C(0)=0, the final code series becomes zero. In this case, the generated code is only the termination marker (‘FF02’). Thus, the JBIG achieves highly efficient compression by means of a learning predictor and an arithmetic coding method.
When highly efficient compression such as the JBIG is used as the compression, a high compression rate can be acquired, but in contrast it is difficult to increase the processing speed. For example, in Japanese Published Unexamined Patent Application No. Hei 6-311045, a technique is disclosed which increases the operation speed of the arithmetic calculation unit. However, since the technique needs to use the learning predictor that feeds back the prediction result and execute the calculation of the augend by each symbol, it is impossible to execute the parallel processing of plural pixels, leading to impossibility of increasing the processing speed, which is a problem to be solved.